Instance Variables
The following instance variables are available globally.
-
The first element is the oldest, and therefore the next to be acked.
May only be accessed inside objc_sync_enter(self).
Declaration
Swift
private var queue: <<error type>>
-
The SwimListManager instance that was given to us in the init.
Declaration
Swift
public var swimListManager: SwimSwift.SwimListManager { get }
-
The Swim objects in this list.
Equivalent to swimListManager.objects (this is just an alias for convenience).
Declaration
Swift
public var swimObjects: [SwimModelProtocolBase] { get }
-
The section in the UITableView where objects from the Swim list will appear.
This defaults to 0. You may set it from your subclass if you want to use section 0 for something else. In that case, you must also override all the UITableViewDataSource methods and call SwimListTableViewController’s implementation of those if and only if the given section is equal to objectSection.
Declaration
Swift
public var swimObjectSection: Int
-
The URI of the lane to which this
Downlink
connects.Declaration
Swift
var laneUri: <<error type>> { get }
-
true
if this link should be automatically re-established after network connection failures. The keep-alive mode can be changed at any time by assigning a new value to this property.Declaration
Swift
var keepAlive: Bool { get set }
-
true
if the network connection carrying this link is currently connected.Declaration
Swift
var connected: Bool { get }
-
The properties of this
Downlink
.Declaration
Swift
var laneProperties: SwimSwift.LaneProperties { get }
-
The URI of the network endpoint to which this
Downlink
connects.Declaration
Swift
var hostUri: <<error type>> { get }
-
May only be accessed under objc_sync_enter(self)
Declaration
Swift
private var connections: <<error type>>
-
May only be accessed under objc_sync_enter(self)
Declaration
Swift
private var stats: <<error type>>
-
Set this whenever your user signs in or out (set it to nil to sign out).
Setting this will close all open DB connections.
Note that this value will be used to name a directory on the filesystem. This will be sanitized to remove troublesome characters, but since you need to guarantee uniqueness between users, you should ensure that it will be unique even after the sanitization. Using an ASCII UUID is recommended.
Declaration
Swift
private var userId: String? { get set }
-
true if this instance has called tableView.beginUpdates() and has not yet called tableView.endUpdates().
This is important if you want to make a call to cellForRowAtIndexPath or similar, because you will have to take any pending inserts or deletes into account.
You hopefully don’t need to look at this in practice, because this class will close any pending table updates if swimList(didUpdateObject:) is called, and that’s the only time I anticipate you needing to call cellForRowAtIndexPath.
Declaration
Swift
public var insideBeginUpdates: Bool
-
The URI of the network endpoint to which the scope is bound.
Declaration
Swift
var hostUri: <<error type>> { get }
-
The URI of the service to which the scope is bound. An absolute URI resolved against
hostUri
.Declaration
Swift
var nodeUri: <<error type>> { get }
-
Whether this object is
highlighted
. This is used for objects in table views to indicate that the row is being highlighted or edited.Declaration
Swift
var isHighlighted: Bool { get set }
-
The number of writes back to the server that are still pending. In other words, if this is greater than zero, the record hasn’t yet been saved back to the server since it was last updated.
Note that if a write permanently fails, this field will be zero (no writes in progress) but the content of this object is still potentially out of sync with the server (the write failed).
Declaration
Swift
var serverWritesInProgress: Int { get set }
-
Assuming that this SwimUri is for a node or lane, this is the corresponding SwimUri for the host.
Declaration
Swift
public var hostUri: <<error type>> { get }
-
The URI of the service to which the scope is bound. An absolute URI resolved against
hostUri
.Declaration
Swift
var nodeUri: <<error type>> { get }
-
The URI of the network endpoint to which the scope is bound.
Declaration
Swift
var hostUri: <<error type>> { get }
-
The URI of the lane to which the scope is bound.
Declaration
Swift
var laneUri: <<error type>> { get }
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var networkMonitor: SwimSwift.SwimNetworkConditionMonitor.ServerMonitor?
-
Retry managers, one per lane. These are responsible for making sure that writes are pushed back to the server whenever we can. Note that nothing ever leaves this dictionary, even once the lane is deregistered. That way, if the downlink is closed then we’ll still be there to retry when it is re-opened.
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var retryManagers: <<error type>>
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var downlinks: <<error type>>
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var idleTimer: NSTimer?
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var socket: <<error type>>
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var reconnectTimeout: NSTimeInterval
-
AuthRequests that have been sent to the server and for which we have not yet received an AuthedResponse.
Declaration
Swift
private let inFlightAuthRequests: SwimSwift.TaskQueue
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var credentials: <<error type>>
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var sendBuffer: [Envelope]
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var reconnectTimer: NSTimer?
-
Commands that have been sent to self.channel and for which we have not yet received an ack.
Declaration
Swift
private let inFlightCommands: SwimSwift.TaskQueue
-
Declaration
Swift
var stringBySanitizingFilename: String { get }
Return Value
A copy of this string, with runs of any slashes, backslashes or unprintable characters replaced with a single space. Whitespace is also trimmed from front and back of each component. This means that the string can be used as a filename, allowing as many
unusual
characters as possible.
-
Must be set to self by the subclass’s init method.
Declaration
Swift
var uplink: Downlink!
-
Read-only from this client’s point of view.
This means that no command buffer will be created, and any attempted writes will fail immediately.
This does not mean that the lane contents won’t change; the server may still push changes to us.
Declaration
Swift
public var isClientReadOnly: Bool
-
Whether this lane has no client-side persistent store.
Declaration
Swift
public var isTransient: Bool
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var firstInsertion: NSTimeInterval
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var objectArray: [T]?
-
May only be accessed under objc_sync_enter(self).
Declaration
Swift
private var delayBlock: dispatch_block_t?
-
May only be accessed under objc_sync_enter(monitors).
Declaration
Swift
private var monitors: [String : SwimSwift.SwimNetworkConditionMonitor.ServerMonitor]
-
The network condition the last time we received any information on the matter.
Use NSNotificationCenter with conditionChangedNotification to listen for changes that will affect this property.
Declaration
Swift
public private(set) var networkCondition: SwimSwift.SwimNetworkConditionMonitor.NetworkCondition
-
The SwimListManager instance that was given to us in the init.
Declaration
Swift
public var swimListManager: SwimSwift.SwimListManager { get }
-
The section in the UITableView where objects from the Swim list will appear.
This defaults to 0. You may set it from your subclass if you want to use section 0 for something else. In that case, you must also override all the UITableViewDataSource methods and call SwimListTableViewController’s implementation of those if and only if the given section is equal to objectSection.
Declaration
Swift
public var swimObjectSection: Int
-
The Swim objects in this list.
Equivalent to listManager.objects (this is just an alias for convenience).
Declaration
Swift
public var swimObjects: [SwimModelProtocolBase] { get }
-
May only be accessed under objc_sync_enter(self)
Declaration
Swift
var delegates: SwimSwift.WeakArray<AnyObject>
-
This is kept in reverse order from what came out of the database, so that we can use popLast to get each entry in turn.
Declaration
Swift
private var commandsBeingRetried: [SwimSwift.OplogEntry]
-
This is a duplicate of self.delegate, except this is strongly retaining, since this instance needs to own the SwimGoogleSignInDelegate.
Declaration
Swift
private var swimGoogleSignInDelegate: SwimSwift.SwimGoogleSignInDelegate? { get set }